#ifndef RESTORER_H
#define RESTORER_H
#include "GpuSpeRestorer.cuh"
#include "tools.hpp"
#include <QObject>
#include <QDebug>
class Restorer : public QObject
{
	Q_OBJECT
private:
	GpuSpeRestorer *gpu_restorer;
	queue<FrameData> *frame_data;
	queue<unsigned char*> *spe_frame_data;
	queue<unsigned char*> *spe_frame_merge_data;
	char *code;
	bool require_flag = false;
	int device_num;
	volatile static int serial_A;
	volatile static int serial_B; 
public:
	explicit Restorer(QObject *parent = 0);
	~Restorer();
	bool continue_signal = true;
	RawInfo rawinfo;

public slots:
	void receive(queue<FrameData> * _frame_data, queue<unsigned char*> * _spe_frame_data, queue<unsigned char*> * _spe_frame_merge_data, char * code, int _device_num);
	void restore();
signals:
	void dataReady(int num);
	void sendFrameRate(float f);
};
#endif